package com.centaline.androidsalesblog.model.databaseobject;

import android.os.Parcel;
import android.os.Parcelable;

import com.centaline.androidsalesblog.model.businissobject.NewEstDistrictBo;
import com.centaline.androidsalesblog.model.businissobject.NewEstGScopeBo;
import com.centaline.androidsalesblog.model.businissobject.NewEstMainHouseTypeBo;
import com.google.gson.annotations.SerializedName;

import org.litepal.crud.DataSupport;

import java.util.ArrayList;

/**
 * 新盘
 * Created by guilin on 16/2/23.
 */
public class NewEstDo extends DataSupport implements Parcelable {


    private String EstExtId;
    @SerializedName("IsOnline")
    private boolean Online;
    @SerializedName("IsTop")
    private boolean Top;
    private String AdName;
    private String EstType;
    private double AveragePrice;
    private double MinUnitPrice;
    private double MaxUnitPrice;
    private double MinTotalPrice;
    private double MaxTotalPrice;
    private String CreateTime;
    private String UpdateTime;
    private int AllCount;
    private int DistrictId;
    private int GScopeId;
    private String RoadName;
    private String Address;
    private double lng;
    private double lat;
    private String Status;
    private String Fitment;
    private String EstName;
    private boolean HasBookingActivity;
    private String IconUrl;
    @SerializedName("District")
    private NewEstDistrictBo newEstDistrictBo;
    @SerializedName("GScope")
    private NewEstGScopeBo newEstGScopeBo;
    @SerializedName("MainHouseTypes")
    private ArrayList<NewEstMainHouseTypeBo> newEstMainHouseTypeBos;
    private String regionName;
    private String gscopName;

    public String getEstExtId() {
        return EstExtId;
    }

    public void setEstExtId(String estExtId) {
        EstExtId = estExtId;
    }

    public boolean isOnline() {
        return Online;
    }

    public void setOnline(boolean online) {
        Online = online;
    }

    public boolean isTop() {
        return Top;
    }

    public void setTop(boolean top) {
        Top = top;
    }

    public String getAdName() {
        return AdName;
    }

    public void setAdName(String adName) {
        AdName = adName;
    }

    public String getEstType() {
        return EstType;
    }

    public void setEstType(String estType) {
        EstType = estType;
    }

    public double getAveragePrice() {
        return AveragePrice;
    }

    public void setAveragePrice(double averagePrice) {
        AveragePrice = averagePrice;
    }

    public double getMinUnitPrice() {
        return MinUnitPrice;
    }

    public void setMinUnitPrice(double minUnitPrice) {
        MinUnitPrice = minUnitPrice;
    }

    public double getMaxUnitPrice() {
        return MaxUnitPrice;
    }

    public void setMaxUnitPrice(double maxUnitPrice) {
        MaxUnitPrice = maxUnitPrice;
    }

    public double getMinTotalPrice() {
        return MinTotalPrice;
    }

    public void setMinTotalPrice(double minTotalPrice) {
        MinTotalPrice = minTotalPrice;
    }

    public double getMaxTotalPrice() {
        return MaxTotalPrice;
    }

    public void setMaxTotalPrice(double maxTotalPrice) {
        MaxTotalPrice = maxTotalPrice;
    }

    public String getCreateTime() {
        return CreateTime;
    }

    public void setCreateTime(String createTime) {
        CreateTime = createTime;
    }

    public String getUpdateTime() {
        return UpdateTime;
    }

    public void setUpdateTime(String updateTime) {
        UpdateTime = updateTime;
    }

    public int getAllCount() {
        return AllCount;
    }

    public void setAllCount(int allCount) {
        AllCount = allCount;
    }

    public int getDistrictId() {
        return DistrictId;
    }

    public void setDistrictId(int districtId) {
        DistrictId = districtId;
    }

    public int getGScopeId() {
        return GScopeId;
    }

    public void setGScopeId(int GScopeId) {
        this.GScopeId = GScopeId;
    }

    public String getRoadName() {
        return RoadName;
    }

    public void setRoadName(String roadName) {
        RoadName = roadName;
    }

    public String getAddress() {
        return Address;
    }

    public void setAddress(String address) {
        Address = address;
    }

    public double getLng() {
        return lng;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public String getStatus() {
        return Status;
    }

    public void setStatus(String status) {
        Status = status;
    }

    public String getFitment() {
        return Fitment;
    }

    public void setFitment(String fitment) {
        Fitment = fitment;
    }

    public String getEstName() {
        return EstName;
    }

    public void setEstName(String estName) {
        EstName = estName;
    }

    public boolean isHasBookingActivity() {
        return HasBookingActivity;
    }

    public void setHasBookingActivity(boolean hasBookingActivity) {
        HasBookingActivity = hasBookingActivity;
    }

    public String getIconUrl() {
        return IconUrl;
    }

    public void setIconUrl(String iconUrl) {
        IconUrl = iconUrl;
    }

    public NewEstDistrictBo getNewEstDistrictBo() {
        return newEstDistrictBo;
    }

    public void setNewEstDistrictBo(NewEstDistrictBo newEstDistrictBo) {
        this.newEstDistrictBo = newEstDistrictBo;
    }

    public NewEstGScopeBo getNewEstGScopeBo() {
        return newEstGScopeBo;
    }

    public void setNewEstGScopeBo(NewEstGScopeBo newEstGScopeBo) {
        this.newEstGScopeBo = newEstGScopeBo;
    }

    public ArrayList<NewEstMainHouseTypeBo> getNewEstMainHouseTypeBos() {
        return newEstMainHouseTypeBos;
    }

    public void setNewEstMainHouseTypeBos(ArrayList<NewEstMainHouseTypeBo> newEstMainHouseTypeBos) {
        this.newEstMainHouseTypeBos = newEstMainHouseTypeBos;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    public String getGscopName() {
        return gscopName;
    }

    public void setGscopName(String gscopName) {
        this.gscopName = gscopName;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.EstExtId);
        dest.writeByte(Online ? (byte) 1 : (byte) 0);
        dest.writeByte(Top ? (byte) 1 : (byte) 0);
        dest.writeString(this.AdName);
        dest.writeString(this.EstType);
        dest.writeDouble(this.AveragePrice);
        dest.writeDouble(this.MinUnitPrice);
        dest.writeDouble(this.MaxUnitPrice);
        dest.writeDouble(this.MinTotalPrice);
        dest.writeDouble(this.MaxTotalPrice);
        dest.writeString(this.CreateTime);
        dest.writeString(this.UpdateTime);
        dest.writeInt(this.AllCount);
        dest.writeInt(this.DistrictId);
        dest.writeInt(this.GScopeId);
        dest.writeString(this.RoadName);
        dest.writeString(this.Address);
        dest.writeDouble(this.lng);
        dest.writeDouble(this.lat);
        dest.writeString(this.Status);
        dest.writeString(this.Fitment);
        dest.writeString(this.EstName);
        dest.writeByte(HasBookingActivity ? (byte) 1 : (byte) 0);
        dest.writeString(this.IconUrl);
        dest.writeParcelable(this.newEstDistrictBo, 0);
        dest.writeParcelable(this.newEstGScopeBo, 0);
        dest.writeTypedList(newEstMainHouseTypeBos);
        dest.writeString(this.regionName);
        dest.writeString(this.gscopName);
    }

    public NewEstDo() {
    }

    protected NewEstDo(Parcel in) {
        this.EstExtId = in.readString();
        this.Online = in.readByte() != 0;
        this.Top = in.readByte() != 0;
        this.AdName = in.readString();
        this.EstType = in.readString();
        this.AveragePrice = in.readDouble();
        this.MinUnitPrice = in.readDouble();
        this.MaxUnitPrice = in.readDouble();
        this.MinTotalPrice = in.readDouble();
        this.MaxTotalPrice = in.readDouble();
        this.CreateTime = in.readString();
        this.UpdateTime = in.readString();
        this.AllCount = in.readInt();
        this.DistrictId = in.readInt();
        this.GScopeId = in.readInt();
        this.RoadName = in.readString();
        this.Address = in.readString();
        this.lng = in.readDouble();
        this.lat = in.readDouble();
        this.Status = in.readString();
        this.Fitment = in.readString();
        this.EstName = in.readString();
        this.HasBookingActivity = in.readByte() != 0;
        this.IconUrl = in.readString();
        this.newEstDistrictBo = in.readParcelable(NewEstDistrictBo.class.getClassLoader());
        this.newEstGScopeBo = in.readParcelable(NewEstGScopeBo.class.getClassLoader());
        this.newEstMainHouseTypeBos = in.createTypedArrayList(NewEstMainHouseTypeBo.CREATOR);
        this.regionName = in.readString();
        this.gscopName = in.readString();
    }

    public static final Parcelable.Creator<NewEstDo> CREATOR = new Parcelable.Creator<NewEstDo>() {
        public NewEstDo createFromParcel(Parcel source) {
            return new NewEstDo(source);
        }

        public NewEstDo[] newArray(int size) {
            return new NewEstDo[size];
        }
    };
}
